package com.xbongbong.paas.pojo.dto;

import com.xbongbong.paas.toolbox.helper.PageHelper;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;

/**
 * @author: lee
 * @date: 2019/8/5 15:27
 * @desrcption: 开启流程对象
 */
@Getter
@Setter
@ToString
public class ProcessVersionDTO extends BaseDTO {

    private static final long serialVersionUID = 2191119070320345493L;

    private static final Integer DEFAULT_USER_PAGE_SIZE = PageHelper.PAGE_SIZE;

    /**
     * 应用id PaaS用
     */
    private Long appId;
    /**
     * 表单id PaaS用
     */
    private Long formId;
    /**
     * 菜单id PaaS用
     */
    private Long menuId;
    /**
     * 是否是saas 1：saas  2：paas
     */
    @DecimalMin(value = "1", message = "{dto.msg.processUpdate.saasMark.DecimalMin}")
    @DecimalMax(value = "2", message = "{dto.msg.processUpdate.saasMark.DecimalMax}")
    @NotNull(message = "saas标记不能为空")
    private Integer saasMark;
    /**
     * saas业务类型
     */
    private Integer businessType;

    private Integer del;
    /**
     * 2 未归档
     * 1 归档
     */
    private Integer archive;

    /**
     * 分页当前页
     */
    private Integer page;

    /**
     * 分页每页记录数
     */
    private Integer pageSize;

    public ProcessVersionDTO() {
        del = 0;
        page = 1;
        pageSize = DEFAULT_USER_PAGE_SIZE;
        archive = 2;
    }
}
